/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.mvc.noticias;

import com.beans.NoticiaBean;
import com.gestores.GestionNoticias;
import com.mvc.RequestHandler;
import java.io.IOException;
import javax.naming.NamingException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 *
 * @author victor
 */
public class ConsultarNoticias implements RequestHandler {

    public void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, NamingException {
        
        String idNoticia = (String) request.getParameter("idNoticia");
        String historica = (String) request.getParameter("historica");
        String modo = (String) request.getParameter("modo");
        
        NoticiaBean noticia=GestionNoticias.getInstance().consultaNoticia(idNoticia);
        
        request.setAttribute("noticia", noticia);
        request.setAttribute("historica", historica);
        request.setAttribute("modo", modo);
    }
}
